/*
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-10-24 17:09:14
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-10-24 17:26:33
 * @FilePath: \app\src\views\canvas\circle\js\base.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default class Base {
    cvs
    data
    ctx
    bl = 2
    fontSize = 20 * this.bl
    lineHeight = this.fontSize * 1.2
    constructor(cvs) {
        let {
            fontSize,
            bl
        } = this
        const ctx = cvs.getContext('2d')
        cvs.height = cvs.height * bl
        cvs.width = cvs.width * bl
        cvs.style.height = `${cvs.height / bl}px`
        cvs.style.width = `${cvs.width / bl}px`

        ctx.font = `${fontSize}px 微软雅黑`
        this.ctx = ctx
        this.cvs = cvs
    }
    init(data) {
        this.data = data
        this.render()
    }
    render() {

    }
}